﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace LuShanTea.Front.Web.Models
{
    public class UserUpdatePasswordModel
    {
        [Required]
        [RegularExpression(@"^[a-zA-Z0-9].{5,17}$", ErrorMessage = "密码以字母开头长度为6~18，只能包含字母、数字和字符")]
        public string Password { get; set; }

        [Required]
        [RegularExpression(@"^[a-zA-Z0-9].{5,17}$", ErrorMessage = "密码以字母开头长度为6~18，只能包含字母、数字和字符")]
        public string NewPassword { get; set; }

        [Required]
        [Compare(nameof(NewPassword), ErrorMessage = "两次密码不一致")]
        public string ReNewPassword { get; set; }
    }
}